package org.bioversityinternational.mgbms.model.dao;

import org.apache.log4j.Logger;
import org.bioversityinternational.mgbms.model.dao.base.BaseDao;
import org.bioversityinternational.mgbms.model.domain.OrderStatus;
import org.springframework.stereotype.Component;

@Component
public class OrderStatusDao extends BaseDao<OrderStatus, Integer>
{
	private static final Logger LOG = Logger.getLogger(OrderStatusDao.class);
	
	public static final int ORDER_STATUS_CANCELLED = 0;				/* must match the id of the record labelled "Cancelled" in the database */
	public static final int ORDER_STATUS_INITIAL = 1;				/* must match the id of the record labelled "Awaiting SMTA" in the database */
	public static final int ORDER_STATUS_PARTIALLY_SHIPPED = 4;		/* must match the id of the record labelled "Partially shipped" in the database */
	
	public OrderStatusDao() {
		super(OrderStatus.class);		
        LOG.debug("OrderStatusDao constructed");
	}

	@Override
	public Integer getIdFromString(String sIdAsString) {
		return Integer.parseInt(sIdAsString);
	}
		
}

